import { CreateDate, DateTime, Digdit, Entity, Jsonb, PrimaryUuid, Title, UpdateDate } from "@sker/core";

@Entity({ name: 'jd_rate_plan' })
export class JdRatePlan {
    @PrimaryUuid()
    id: string;

    @Title({ comment: '投放计划' })
    name: string;

    @Title({ comment: '投放计划-中文' })
    name_cn: string;

    @DateTime({ comment: '开始时间' })
    start_date: Date;

    @DateTime({ comment: '结束时间' })
    end_date: Date;

    @CreateDate()
    create_date: Date;

    @UpdateDate()
    update_date: Date;

    @Jsonb({ comment: '投放酒店', default: [] })
    hotelids: string[];

    @Jsonb({ comment: '投放目标', default: [] })
    fenxiaos: string[];

    @Digdit({ comment: '价格，公式为 price * (100 + value)/100' })
    value: number;
}
